
class coeur : public base
{
public:
	coeur();
	~coeur();

	int init(stringc);
	int update();
	int close();

	int setCaption(stringw);

	IAnimatedMeshSceneNode* addMesh(stringc);

	ITexture* loadTexture(stringc);

	dimension2d<s32> getDim();

	actionMesh *getSelectedAction();

	item* getItem(int);

	actionMesh* getActionMesh(int);
	actionMesh* getActionMesh(ISceneNode*);

	localItem* getObservationMesh(int);
	localItem* getObservationItem(int);
	localItem* getCombinaison();

	position2d<s32> getCurPos();

	u32 getTime();

	int play(stringc);

	virtual bool OnEvent(const SEvent&);

	logger* getLogger();

	friend class console;
private:
	int loadChap(int);
	int loadLieu(int);
	int loadLocal(int);

	IrrlichtDevice *device;
	IVideoDriver* driver;
	ISceneManager* smgr;
	IGUIEnvironment* env;

	logger* mylogger;

	ICameraSceneNode* cam;
	
	E_DRIVER_TYPE dr;
	dimension2d<s32> dim;
	int bits;
	bool fullscreen;
	bool stencilbuffer;
	bool vsync;
	int lang;

	interface* in;
	console* co;

	bool q;

	position2d<s32> curPos;

	string<stringc*>* pathChap;
	string<stringc*>* pathLieu;
	string<stringc*>* pathLocal;
	chap* currentChap;
	lieu* currentLieu;
	local* currentLocal;

	actionMesh *selectedAction;

	IMetaTriangleSelector* metaSelector;

	ISoundEngine* engine;
};

